package com.atguigu.gmall.order.mapper;

import com.atguigu.gmall.order.entity.OrderInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Entity com.atguigu.gmall.order.entity.OrderInfo
 */
public interface OrderInfoMapper extends BaseMapper<OrderInfo> {

    /**
     * 利用CAS思想 实现乐观锁幂等性关单
     * @param orderId
     * @param userId
     */
    void updateOrderStatusByCAS(@Param("expectOrderStatus") String expectOrderStatus,
                                @Param("expectProcessStatus") String expectProcessStatus,
                                @Param("orderStatus") String orderStatus,
                                @Param("processStatus") String processStatus,
                                @Param("orderId") Long orderId,
                                @Param("userId") Long userId);


}




